﻿<Page x:Class="WpfPostgresql.PosilkasList"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="PosilkasList">
    <Grid>
        <StackPanel>
            <ComboBox Height="25" ItemsSource="{Binding Posilkas, Mode=TwoWay}" SelectedItem="{Binding SelectedPosilka}" >
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding ID}"/>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
            <StackPanel>
                                <StackPanel Orientation="Horizontal">
                                    <Border BorderBrush="Black" SnapsToDevicePixels="True" BorderThickness="1">
                        <TextBlock Width="150" Text="{Binding SelectedMagazName}"/>
                                    </Border>
                                    <Border BorderBrush="Black" SnapsToDevicePixels="True" BorderThickness="1">
                        <TextBlock Width="100" Text="{Binding SelectedVoditelName}"/>
                                    </Border>
                                </StackPanel>
                <ScrollViewer Height="200">
                    <ListBox ItemsSource="{Binding TovarFromPosilka}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Border BorderBrush="Black" SnapsToDevicePixels="True" BorderThickness="1">
                                        <TextBlock Width="100" Text="{Binding Name}"/>
                                    </Border>
                                    <Border BorderBrush="Black" SnapsToDevicePixels="True" BorderThickness="1">
                                        <TextBlock Width="50" Text="{Binding N}"/>
                                    </Border>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </ScrollViewer>
            </StackPanel>

        </StackPanel>
    </Grid>
</Page>
